package cn.caijiapeng.spt.validate.base;

import com.jfinal.core.Controller;
import com.jfinal.validate.Validator;

import cn.caijiapeng.spt.bean.Resp;

public abstract class BaseValidate extends Validator{
	
	public BaseValidate() {
		setShortCircuit(true);
	}

	@Override
	protected abstract void validate(Controller c);

	@Override
	protected void handleError(Controller c) {
		c.renderJson(Resp.fail(c.getAttrForStr("msg")));
	}

}
